#include"Heap.h"
#include"Queue.h"
TreeNode* CreateTree()
{
	TreeNode* node1 = BuyTreeNode(1);
	TreeNode* node2 = BuyTreeNode(2);
	TreeNode* node3 = BuyTreeNode(3);
	TreeNode* node4 = BuyTreeNode(4);
	TreeNode* node5 = BuyTreeNode(5);
	TreeNode* node6 = BuyTreeNode(6);
	TreeNode* node7 = BuyTreeNode(7);

	node1->left = node2;
	node1->right = node4;
	node2->left = node3;
	node4->left = node5;
	node4->right = node6;
	node2->right = node7;

	return node1;
}
int main()
{
	TreeNode* root = CreateTree();
	BinaryTreePrevOrder(root);
	printf("\n");

	BinaryTreeInOrder(root);
	printf("\n");

	/*size = 0;
	TreeSize(root);
	printf("TreeSize:%d\n", size);

	size = 0;
	TreeSize(root);
	printf("TreeSize:%d\n", size);

	size = 0;
	TreeSize(root);
	printf("TreeSize:%d\n", size);*/


	printf("TreeSize:%d\n", BinaryTreeSize(root));
	printf("TreeSize:%d\n", BinaryTreeSize(root));
	printf("TreeSize:%d\n", BinaryTreeSize(root));

	//printf("TreeLeafSize:%d\n", BinaryTreeLeafSize(root));
	//printf("TreeHeight:%d\n", BinaryTreeHeight(root));
	//printf("TreeLevelK:%d\n", BinaryTreeLevelK(root, 4));

	TreeNode* ret = BinaryTreeFind(root, 5);
	printf("TreeFind:%p\n", ret);
	//ret->data++;
	printf("TreeComplete:%d\n", BinaryTreeComplete(root));

	//PrevOrder(root);
	//printf("\n");

	//LevelOrder(root);

	BinaryTreeDestory(root);
	root = NULL;

	return 0;
}